package com.codingfly.core.jdbc.service;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface JPAService<T, ID> {
    T findById(ID id);

    void save(T entity);

    void save(T[] entities);

    void save(List<T> entities);

    void delete(T entity);

    void delete(T[] entities);

    void delete(List<T> entities);

    void deleteById(ID id);

    void deleteById(ID[] ids);

    void deleteById(List<ID> ids);

    Page<T> page(Pageable pageable);

    List<T> findAll();

}
